// 引入koa-router
const Router = require('koa-router')
const {usersValid} = require('../../middleware/valid')
// 引入处理函数层
const {getUsers, deluser, identity } = require('../../controller/usersManage.controller')
// 创建实例
// prefix在路由地址前缀加上默认地址
const router = new Router({ prefix:'/api/usersmanage' })
// 1.获取全部用户信息
router.post('/getusers', getUsers)
// 2. 禁用某个用户
router.post('/deluser',usersValid, deluser)
// 3. 修改用户身份
router.post('/identity',usersValid, identity)
module.exports = router